package com.zhouxiaoge.命令模式;

/**
 * @author 周小哥 gqzmy@163.com 2023/2/27 14:24
 */

public class CommandPatternDemo {
    public static void main(String[] args) {
        Stock stock = new Stock();
        BuyStock buyStock = new BuyStock(stock);
        SellStock sellStock = new SellStock(stock);
        Broker broker = new Broker();
        broker.takeOrder(buyStock);
        broker.takeOrder(sellStock);
        broker.placeOrders();
    }
}
